﻿<pages:PageBase x:Class="PeoplesJukebox.Web.Pages.HomePage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:pages="clr-namespace:PeoplesJukebox.Web.Pages">

    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="500"></RowDefinition>
            <RowDefinition Height="100"></RowDefinition>
        </Grid.RowDefinitions>

        <Button Grid.Row="0" Click="Button_Click" Style="{StaticResource LargeTextButton}">
            <StackPanel Orientation="Horizontal" VerticalAlignment="Center">
                <Image Source="/Images/Track.png" Style="{StaticResource ButtonImage}"></Image>
                <TextBlock Text="Select a track" VerticalAlignment="Center"></TextBlock>
            </StackPanel>
        </Button>

        <Border x:Name="nowPlaying" Height="100" CornerRadius="10" Margin="10" Width="600" 
                BorderBrush="DimGray" BorderThickness="5" Background="LightGray"
                Visibility="Collapsed" Grid.Row="1">
            <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
                <StackPanel Orientation="Vertical">
                    <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
                        <TextBlock Text="Now Playing" Style="{StaticResource NowPlayingLabel}"/>
                        <TextBlock Text="{Binding Title}" Style="{StaticResource NowPlayingValue}"/>
                    </StackPanel>
                    <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
                        <TextBlock Text="from" Visibility="{Binding AlbumTitle, Converter={StaticResource StringVisibilityConverter}}" Style="{StaticResource NowPlayingLabel}"/>
                        <TextBlock Text="{Binding AlbumTitle}" Visibility="{Binding AlbumTitle, Converter={StaticResource StringVisibilityConverter}}" Style="{StaticResource NowPlayingValue}"/>
                        <TextBlock Text="by" Visibility="{Binding AlbumName, Converter={StaticResource StringVisibilityConverter}}" Style="{StaticResource NowPlayingLabel}"/>
                        <TextBlock Text="{Binding ArtistName}" Visibility="{Binding AlbumName, Converter={StaticResource StringVisibilityConverter}}" Style="{StaticResource NowPlayingValue}"/>
                    </StackPanel>
                    <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
                        <TextBlock Text="Chosen by: " Visibility="{Binding ChosenBy, Converter={StaticResource StringVisibilityConverter}}" Style="{StaticResource NowPlayingLabel}" FontSize="12"/>
                        <TextBlock Text="{Binding ChosenBy}" Visibility="{Binding ChosenBy, Converter={StaticResource StringVisibilityConverter}}" Style="{StaticResource NowPlayingLabel}" FontSize="12"/>
                    </StackPanel>
                </StackPanel>
            </StackPanel>
        </Border>
    </Grid>
</pages:PageBase>
